/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.ove.palette.swing;

/**
 *
 * @author Mr.Sam
 */
import javax.swing.*;
import java.awt.*;

public class JPaletteButton extends JButton {
    /**
     * Creates a button with no set text or icon.
     */
    public JPaletteButton() {
        this(null, null);
    }
    
    /**
     * Creates a button with an icon.
     *
     * @param icon  the Icon image to display on the button
     */
    public JPaletteButton(Icon icon) {
        this(null, icon);
    }
    
    /**
     * Creates a button with text.
     *
     * @param text  the text of the button
     */
    public JPaletteButton(String text) {
        this(text, null);
    }
    
    /**
     * Creates a button with initial text and an icon.
     * @param text  the text of the button.
     * @param icon  the Icon image to display on the button
     */
    public JPaletteButton(String text, Icon icon) {
        super(text, icon);
        setMargin(new Insets(2, 2, 2, 2));
        setFont(new Font("Dialog", Font.PLAIN, 11));
    }
}